package RJ;

import java.util.*;

public class GroupTable {
	
	private HashMap<String, Group> GT;
	Iterator iter = null;
	
	public Iterator getIter() {		
		return iter = getGT().values().iterator();
	}

	public GroupTable(){
		setGT(new HashMap<String, Group>());
	}
	
	public void insert(String groupName) {
		getGT().put(groupName, new Group(groupName));
	}

	public boolean selectName(String g) {
		return getGT().containsKey(g);
	}

	public Group getGroup(String grp) {
		return getGT().get(grp);
	}
	@Override
	public String toString(){
		
		return getGT().toString();		
	}

	public HashMap<String, Group> getGT() {
		return GT;
	}

	public void setGT(HashMap<String, Group> gT) {
		GT = gT;
	}

}
